package cn.doitedu.day04

import cn.doitedu.day01.utils.SparkUtil
import org.apache.spark.rdd.RDD

/**
 * @Date 22.4.1
 * @Created by HANGGE
 * @Description
 */
object C14_转换算子_SortByKey {

  def main(args: Array[String]): Unit = {

    val sc = SparkUtil.getSc

    val rdd3 = sc.parallelize(List(("b", 3), ("c", 3), ("a", 11), ("f", 6)) ,1)
    val res = rdd3.sortByKey(true)
    res.foreach(println)

  }
}
